You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TOpenCLMtxVec Class > TOpenCLMtxVec Methods > Normalize Method > TOpenCLMtxVec.Normalize Method ([In] TOpenCLMtxVec, [In] double, [In] double)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TOpenCLMtxVec.Normalize Method ([In] TOpenCLMtxVec, [In] double, [In] double)

Normalize object.

Syntax
C#
Visual Basic
public TOpenCLMtxVec Normalize([In] TOpenCLMtxVec Vec, [In] double SubOffset, [In] double DivFactor);

Normalizes Vec object by subtracting a constant Offset from Vec elements and dividing the result by constant Factor: 

 

The results are stored in calling object. Use this method if you want to do a multiply and add (scale and offset) operations in a single method call.

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TOpenCLVector a,b; clMtxVec.CreateIt(out a, out b); try { a.CopyFromArray(new double[] {1,2,3,4}); // a = [1,2,3,4] b.Normalize(a,2,3); } finally { clMtxVec.FreeIt(ref a, ref b); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!